package edu.hawaii.duedates.library;

import java.util.List;
import com.meterware.httpunit.WebConversation;
import edu.hawaii.duedates.ItemDue;

/**
 * An interface class for any library system to extend from. Includes
 * the login and getItemInfo methods for returning data to user.
 * 
 * @author Tyler Wolff and Scheller Sanchez
 */

public interface LibraryVault {

  /**
   * Attempts to login to a given Library system with user information. System makes use of an
   * HttpUnit WebConversation to scan a systems web page for login form, then inputs user
   * information and submits.
   * 
   * @param id The user ID or first login parameter.
   * @param pass The user password or second login parameter.
   * @return The WebConversation instance after successful login.
   * @throws Exception If login was not successful with these credentials.
   */
  public WebConversation login (String id, String pass) throws Exception;
  
  /**
   * Given valid login information for a Library site, provides info 
   * about a user's borrowed items. 
   * 
   * Items Name, type, and Due date are stored in an ItemDue object.
   * NOTE: date must be formatted and stored as mm-dd-yy
   * 
   * @param id The users ID or parameter 1.
   * @param lastName The user's password or parameter 2.
   * @return A List of ItemDue objects.
   * @throws Exception If problems occur Logging in.
   */
  public List<ItemDue> getItemInfo(String id, String lastName) throws Exception;
  
}
